package com.zt.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.annotation.Configuration;

@Configuration
@ConfigurationProperties(prefix = "alipay")
public class AlipayConfig {
    // 应用ID,您的APPID，收款账号既是你的APPID对应支付宝账号
//    private String appId = "2021000143620470";
//    private String appId = "9021000150638898";
    private String appId;

    // 商户私钥，您的PKCS8格式RSA2私钥
    private String privateKey;
    
    // 支付宝公钥
    private String publicKey;
    
    // 服务器异步通知页面路径
//    private String notifyUrl = "http://182.92.159.164:10002/pay/alipay/notify";
    private String notifyUrl;
//    private String notifyUrl = "http://j687cfc6.natappfree.cc//pay/alipay/notify";
//    private String notifyUrl = "http://localhost:8081/pay/alipay/notify";

    // 页面跳转同步通知页面路径
//    private String returnUrl = "weixin://dl/business/?t=FUf56LXn4aM";
    private String returnUrl;


    // 签名方式
    private String signType = "RSA2";
    
    // 字符编码格式
    private String charset = "utf-8";
    
    // 支付宝网关，这里使用沙箱环境
//    private String gatewayUrl = "https://openapi-11.gz00z.sandbox.alipay.net/gateway.do";
//    private String gatewayUrl = "https://openapi-sandbox.dl.alipaydev.com/gateway.do";
    private String gatewayUrl;

    // 支付宝格式
    private String format = "json";
    
    // Getter and Setter methods
    public String getAppId() {
        return appId;
    }
    
    public void setAppId(String appId) {
        this.appId = appId;
    }
    
    public String getPrivateKey() {
        return privateKey;
    }
    
    public void setPrivateKey(String privateKey) {
        this.privateKey = privateKey;
    }
    
    public String getPublicKey() {
        return publicKey;
    }
    
    public void setPublicKey(String publicKey) {
        this.publicKey = publicKey;
    }
    
    public String getNotifyUrl() {
        return notifyUrl;
    }
    
    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }
    
    public String getReturnUrl() {
        return returnUrl;
    }
    
    public void setReturnUrl(String returnUrl) {
        this.returnUrl = returnUrl;
    }
    
    public String getSignType() {
        return signType;
    }
    
    public void setSignType(String signType) {
        this.signType = signType;
    }
    
    public String getCharset() {
        return charset;
    }
    
    public void setCharset(String charset) {
        this.charset = charset;
    }
    
    public String getGatewayUrl() {
        return gatewayUrl;
    }
    
    public void setGatewayUrl(String gatewayUrl) {
        this.gatewayUrl = gatewayUrl;
    }
    
    public String getFormat() {
        return format;
    }
    
    public void setFormat(String format) {
        this.format = format;
    }
} 